package com.leetcode;

import java.io.*;

public class OutTxt
{
	/**
	 * 往文件写数据
	 */
	public static void Write(String content)
	{
		String filename = "c://aaa.txt";
		try
		{
			PrintStream p = new PrintStream(new BufferedOutputStream(new FileOutputStream(filename, true)));
			p.println(content);
			p.close();
		}
		catch (IOException e)
		{
			System.out.println("Uh oh, got an IOException error!");
			e.printStackTrace();
		}
	}
}
